<?php

class IndirizzoStudio extends AppModel {

    var $useTable = 'indirizzo_studio'; // nome della tabella
	var $hasAndBelongsToMany = 'Disciplina';
	
	
	
	
	public function beforeSave($options = array()){
	    foreach (array_keys($this->hasAndBelongsToMany) as $model){
	      if(isset($this->data[$this->name][$model])){
	        $this->data[$model][$model] = $this->data[$this->name][$model];
	        unset($this->data[$this->name][$model]);
		      }
		    }
		    return true;
	}
	


}

?>